<template>
    <a-table :data-source="dataSource" :pagination="pagination" :columns="columns">
        <slot name="children"/>
    </a-table>
    <div class="pagination">
        <a-pagination size="small"
                      :total="totalCount"
                      show-size-changer
                      show-quick-jumper
                      v-model:current="current"
                      @showSizeChange="onShowSizeChange"
        />
        &nbsp;&nbsp;&nbsp;
        <div>共&nbsp;{{totalCount}}&nbsp;条</div>
    </div>
</template>

<script>
    import zhCN from 'ant-design-vue/es/locale/zh_CN';
    import {useSlots} from 'vue'
    export default {
        name: "StandardTableList",
        props: ['dataSource', 'columns', 'totalCount'],
        data() {
            return {
                current: 0,
                pageSize: 10,
                zh_CN: zhCN,
                slots: useSlots(),
                renderArr: Object.keys(useSlots()),
                pagination: {
                    size: "small",
                    total: 0,
                    current: 0,
                }
            }
        },
        mounted() {

        },
        methods: {
            onShowSizeChange(current, pageSize) {
            }
        }
    }
</script>


<style scoped>
    .pagination {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        margin-left: 70%;
        margin-top: 20px;
    }
</style>